<?php /* Smarty version Smarty-3.1.13, created on 2013-12-19 22:11:26
         compiled from "G:\phpserver\ibo123\templates\admin\ad\adsite.tpl" */ ?>
<?php /*%%SmartyHeaderCode:4839528cc6b2844dc1-67472626%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '041a205497c86f9e0a01e29b3c177ca1942f8d3e' => 
    array (
      0 => 'G:\\phpserver\\ibo123\\templates\\admin\\ad\\adsite.tpl',
      1 => 1387461720,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '4839528cc6b2844dc1-67472626',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.13',
  'unifunc' => 'content_528cc6b2993d72_54743139',
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_528cc6b2993d72_54743139')) {function content_528cc6b2993d72_54743139($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ("admin/header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>
 <?php echo $_smarty_tpl->getSubTemplate ("admin/navibar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>
 <?php echo $_smarty_tpl->getSubTemplate ("admin/sidebar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>



<link rel="stylesheet" type="text/css"
	href="<?php echo @constant('WEBSITE_URL');?>
/public/assets/lib/jquery-easyui-1.3.4/themes/bootstrap/easyui.css">
<link rel="stylesheet" type="text/css"
	href="<?php echo @constant('WEBSITE_URL');?>
/public/assets/lib/jquery-easyui-1.3.4/themes/icon.css">
<script type="text/javascript"
	src="<?php echo @constant('WEBSITE_URL');?>
/public/assets/lib/jquery-easyui-1.3.4/jquery.easyui.min.js"></script>
<script type="text/javascript"
	src="<?php echo @constant('WEBSITE_URL');?>
public/assets/lib/ajaxupload.js"></script>

<style type="text/css">
#addwin {
	margin: -500px 0 0 -280px;
	/* PLAY THE WITH THE VALUES TO SEE GET THE DESIRED EFFECT */
}
</style>


<div class="content">
	<div class="header">
		<div class="stats">
			<p class="stat">
				<!--span class="number"></span-->
			</p>
		</div>

		<h1 class="page-title">广告位置管理</h1>
	</div>
	<div class="container-fluid">
		<div class="row-fluid">

			<!--- START 以上内容不需更改，保证该TPL页内的标签匹配即可 --->
			<table id="grid"
				data-options="url:'admin/adsite/getpage',fitColumns:true,singleSelect:true"
				class="easyui-datagrid" style="width: 700px; height: 370px"
				toolbar="#toolbar" iconCls="icon-save" pagination="true"
				rownumbers="true">
				<thead>
					<tr>
						<th data-options="field:'site_id',width:100,checkbox:true"></th>
						<th data-options="field:'site_name',width:100">位置名称</th>
						<th data-options="field:'site_description',width:100">位置描述</th>
						<!-- 						<th data-options="field:'site_parent',width:100"></th> -->
						<th
							data-options="field:'site_type',width:100,formatter:formateType">位置类型</th>
					</tr>
				</thead>
			</table>

			<div id="toolbar">
				<a href="javascript:void(0)" class="easyui-linkbutton"
					iconCls="icon-add" plain="true" onclick="addWindow()">添加</a> <a
					href="javascript:void(0)" class="easyui-linkbutton"
					iconCls="icon-edit" plain="true" onclick="editWindow()">修改</a> <a
					href="javascript:void(0)" class="easyui-linkbutton"
					iconCls="icon-remove" plain="true" onclick="removeitem()">删除</a>
			</div>

			<div id="addwin" class="modal hide fade">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h5>位置信息管理</h5>
				</div>
				<div class="modal-body">
					<form class=" form-horizontal" id="dataform">
						<input id="site_id" name="site_id" type="text"
							style="display: none;">
						<div class="control-group">
							<label class="control-label">位置名称:</label>
							<div class="controls">
								<input id="site_name" type="text" placeholder="位置名称"
									name="site_name">
							</div>
						</div>


						<div class="control-group">
							<label class="control-label">位置类型:</label>
							<div class="controls">
								<select id="site_type" name="site_type">
									<option value="0">文字连接</option>
									<option value="1">图片连接</option>
									<option value="2">一段脚本</option>
								</select>
							</div>
						</div>

						<div class="control-group">
							<label class="control-label">位置描述:</label>
							<div class="controls">
								<textarea id="site_description" rows="2" type="text"
									placeholder="位置描述" name="site_description">
							</textarea>
							</div>
						</div>
					</form>
				</div>
				<div class="modal-footer" id="div_view">
					<button class="btn btn-success" onclick="addOrModifyItem()"
						type="button" style="width: 100px; align: right;" class="btn">提交</button>

				</div>
			</div>
			<!--- END 以下内容不需更改，请保证该TPL页内的标签匹配即可 --->
			<?php echo $_smarty_tpl->getSubTemplate ("admin/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>


			<script type="text/javascript"
				src="<?php echo @constant('WEBSITE_URL');?>
public/js/rmanger.js"></script>
			<script type="text/javascript">
        var weburl = '<?php echo @constant('WEBSITE_URL');?>
';
        var url = weburl+"admin/adsite";
        var key = "site_id";


        function addWindow(){
        	model("addwin",0);
        	$("#dataform").form('clear');
        }
    	function editWindow(){
    		var select = getSelectItem();
    		if(select == null || select.length == 0 ){
    			$.messager.alert('错误','请选择要修改的记录!');
    			return;
    		}
    		 model("addwin",0);
    		$("#dataform").form('clear');
    		$("#dataform").form('load',select[0]);

    	
    	}
    	function t_modelhide(){
    		 model("addwin",1);
    	}
    	function formateType(value,row,index){
    		if(value == null || value ==""){
    			return ""; 
    		}
    		if(value == 0){
    			return "文字连接";
    		}
    		if(value == 1){
    			return "图片连接";
    		}
    		if(value == 2){
    			return "一段脚本";
    		}
    		 return "";
    	}
     </script><?php }} ?>